package com.example.personnel_oa.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.comment_oa.pojos.SysPost;
import com.example.comment_oa.pojos.Talentpool;
import com.example.personnel_oa.mapper.SysPostMapper;
import com.example.personnel_oa.service.SysPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

/**
* @author asus
* @description 针对表【sys_post】的数据库操作Service实现
* @createDate 2022-10-17 19:05:44
*/
@Service
public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost>
    implements SysPostService {
    @Autowired
    SysPostMapper postMapper;

    @Override
    public List<SysPost> post() {
        QueryWrapper<SysPost> wrapper = new QueryWrapper<>();
        QueryWrapper<SysPost> post = wrapper.ne("POST_ID", 1);
        List<SysPost> sysPosts = postMapper.selectList(post);
        return sysPosts;
    }

    //查询出所有职位不包含懂事长
    @Override
    public List<SysPost> selectPost() {
        List<SysPost> sysPosts = postMapper.selectPost();
        return sysPosts;
    }

    //根据岗位名称查到岗位id和部门id
    @Override
    public SysPost postDept(String postName) {
        SysPost post = postMapper.postDept(postName);
        return post;
    }
}




